package com.dj;

import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;

import org.apache.maven.model.Resource;

import java.io.File;
import java.util.List;

/**
 * Created by daijie on 2017/2/25.
 *
 * 参考:http://blog.csdn.net/vking_wang/article/details/8612981#
 *
 * @author  daijie
 * @goal doc
 *
 * @phase package
 *
 */
public class DocMojo extends AbstractMojo{

    /**
     * @parameter expression= = "${domain}"
     */
    private  String domain ;

    /**
     * @parameter expression="${project.basedir}"
     * @required
     * @readonly
     */
    private File basedir;
    /**
     * @parameter expression="${project.build.sourceDirectory}"
     * @required
     * @readonly
     */
    private File sourcedir;
    /**
     * @parameter expression="${project.build.testSourceDirectory}"
     * @required
     * @readonly
     */
    private File testSourcedir;
    /**
     * @parameter expression="${project.resources}"
     * @required
     * @readonly
     */
    private List<Resource> resources;
    /**
     * @parameter expression="${project.testResources}"
     * @required
     * @readonly
     */
    private List<Resource> testResources;

    /**
     * @parameter expression="${version}"
     * @required
     * @readonly
     */
    private String version = "1.0.0";





    public void execute() throws MojoExecutionException, MojoFailureException {
            getLog().info("===========      doc maven plugin running      ===========");
            getLog().info("param domain==="+domain);
            getLog().info("param basedir==="+basedir);
            getLog().info("param sourcedir==="+sourcedir);
            getLog().info("param testSourcedir==="+testSourcedir);
            getLog().info("param resources==="+resources);
            getLog().info("param testResources==="+testResources);
            getLog().info("param version==="+version);


    }
}
